-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(accessibility): Update editor packages & use hiddenLabel for Icon Button #1257
fix(accessibility): Update editor packages & use hiddenLabel for Icon Button #1257
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good with some suggested label changes. I suggested different labels to reflect how they should be announced rather than tested.
After those changes, we should be good to merge. 👍
@@ -87,7 +87,7 @@ export const SideNavEnvironmentSelector: FC<SideNavEnvironmentSelectorProps> = ( | |||
<IconButton | |||
icon={<LoginIcon className={styles.loginIcon} />} | |||
onClick={onLogInClick} | |||
data-cy="environment-login-icon-button" | |||
hiddenLabel="environment login icon button" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested label change: "Log in to enable environments"
Hidden labels should act as text labels rather than descriptions of the element itself ("button" shouldn't be used in this case).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're 100% right, I forgot the purpose of this with e2e tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<IconButton icon="unfoldMore" data-cy="environment-dropdown-button" /> | ||
<IconButton | ||
icon="unfoldMore" | ||
hiddenLabel="environment dropdown button" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested label change: "Select environment"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<IconButton | ||
icon="add" | ||
onClick={onAddNewTab} | ||
hiddenLabel="add tab button" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested label change: "Add new tab"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<Button | ||
loading={isCustomTypeBeingConverted} | ||
startIcon="moreVert" | ||
variant="secondary" | ||
color="grey" | ||
data-testid="editDropdown" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an IconButton instead? If so:
Suggested label: "Actions" or "Custom type actions"
(I'm not sure if this component is reused with page types. If so, we need to label it correctly.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right, IconButton works. I guess it was before the refactoring that allowed variant="solid".
Done for both
@@ -163,7 +163,7 @@ export const SharedSliceCard: FC<SharedSliceCardProps> = (props) => { | |||
) : action.type === "menu" ? ( | |||
<DropdownMenu modal> | |||
<DropdownMenuTrigger disabled={disabled}> | |||
<IconButton data-cy="slice-action-icon" icon="moreVert" /> | |||
<IconButton hiddenLabel="slice action icon" icon="moreVert" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested label change: "Actions" or "Slice actions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
69c5d33
to
87ab4de
Compare
Context
The Solution
secondary
beingcolor=grey
andtertiary
beingcolor=dark
100%
and it's possible withsx
hiddenLabel
prop instead ofdata-cy
when used for IconButtonImpact / Dependencies
Checklist before requesting a review